import request from "@/utils/request";

// 新增衣服类型
export const _saveClothingStyle = (clothingStyleDto) => request.post('/api/clothingStyle/save', clothingStyleDto)

// 更新衣服类型
export const _updateClothingStyle = (clothingStyleDto) => request.put('/api/clothingStyle/update', clothingStyleDto)

// 删除衣服类型
export const _deleteClothingStyle = (id) => request.delete('/api/clothingStyle/delete?id=' + id)

// 根据id获取衣服类型
export const _getClothingStyleById = (id) => request.get('/api/clothingStyle/getById?id=' + id)

// 获取衣服类型列表（分页）
export const _getClothingStylePage = (clothingStyleDto) => request.get('/api/clothingStyle/page', { params: clothingStyleDto })

// 根据批次ID获取衣服类型列表
export const _getListByBatchId = (batchId) => {
    return request({
        method: 'post',
        url: '/api/clothingStyle/getListByBatchId',
        data: JSON.stringify(batchId),
        headers: {
            'Content-Type': 'application/json'
        }
    })
}